package com.evi.da.data.generated;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
import java.util.List;

public class ResultObject
{
	private String id;
	private List<Metadata> metadata;
	private final String IMAGE_64 = "image64";

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public List<Metadata> getMetadata()
	{
		return metadata;
	}

	public void setMetadata(List<Metadata> metadata)
	{
		this.metadata = metadata;
	}

	public String getImageUrl()
	{
		if (metadata != null)
		{
			for (Metadata metadata1 : metadata)
			{
				if (metadata1.parameter.equalsIgnoreCase(IMAGE_64))
				{
					return metadata1.value;
				}
			}
		}
		return null;
	}

	private static class Metadata
	{
		@XmlAttribute
		private
		String parameter;
		@XmlValue
		private
		String value;
	}
}
